The Financial and Critical Impact of Female Representation in Films: A Study of Bechdel Test Outcomes

Authors
Affiliation

Calderon Flores, Ivana Dayneth

Université de Lausanne

Jaouad, Dorra

Krafft, Mathilde

1. Background and Motivation

The Bechdel Test serves as a widely recognized measure of female representation in films. To pass the test, a movie nmust have at least two named female characters who talk to each other of something other than a man. This test is highlighting important discussions surrounding diversity and gender equality within the film industry. This topic is significant as it not only addresses the representation of women but also engages with broader societal issues such as gender stereotypes and equity.

The intersection of cultural metrics, exemplified by the Bechdel Test, and economic variables, including a film’s budget and revenue, renders this research particularly compelling. By exploring how diversity impacts a film’s commercial and critical success, the study examines two key dimensions: cultural representation and its potential economic and critical consequences.

This research aligns with the overarching goal of leveraging data-driven insights to comprehend the effects of cultural dynamics on creative industries. Through a combination of statistical, predictive, and exploratory analyses, the project aims to address questions of both social significance and commercial relevance.

2. Project Objectives

2.1 Main Objective

The primary objective of this project is to investigate the relationship between the Bechdel Test and other film-related factors, such as budget, genre, and director, on a film’s revenue. The specific aims include:

  • Analyzing whether passing the Bechdel Test has a statistically significant effect on domestic gross or overall revenue.

  • Assessing if films that pass the Bechdel Test tend to win more awards or achieve higher IMDb ratings.

2.2 Sub-goals

  1. Predictive Modeling: Developing a predictive model to estimate a film’s success based on various factors, including the Bechdel Test result, its correlation with awards, and IMDb ratings. This model will provide insights into the probability of a film passing the Bechdel Test based on attributes such as budget, genre, and director.

  2. Correlation Exploration: Investigating correlations between a film’s performance on the Bechdel Test and its revenue, as well as its awards and IMDb ratings, to uncover potential patterns and insights.

  3. Trend Visualization: Visualizing trends between films that either pass or fail the Bechdel Test and their associated economic data, including revenues, budgets, awards won, and IMDb ratings. This visualization will help elucidate the relationship between female representation and film success.

3. Research Questions

In this section, we pose the following research questions to explore the potential influence of female representation in films on commercial and critical success. By examining correlations between Bechdel Test results and metrics like revenue, awards, and IMDb ratings, we aim to identify patterns that link gender diversity with performance outcomes. Additionally, we explore predictive models to assess whether factors such as budget, genre, and director can reliably estimate both a film’s success and its likelihood of passing the Bechdel Test. These questions guide our analysis to uncover data-driven insights into the economic and critical impact of gender representation in the film industry.

  1. Is there a significant correlation between passing the Bechdel test and a film’s revenue?
  2. Do films that pass the Bechdel test tend to win more awards or receive higher IMDb ratings? 
  3. Can we build a predictive model to estimate a film’s success (revenue, awards, IMDb ratings) based on the Bechdel test results and other factors like budget, genre, and director?
  4. Can we develop a predictive model to determine whether a film will pass the Bechdel test based on factors such as budget, genre, and director?

4. Data Collection

In this section, we outline the process of data collection and merging. The data sources for this project were obtained from data.world, where we can access to the following datasets:

  • Dataset df: It contains information regarding the Bechdel test outcomes for various films. The information was gather from BechdelTest.com and The-Numbers.com. The dataset can be accessed directly from: Dataset df.

  • Dataset df2: It includes additional film-related data, such as budget, revenue, genre, director, and awards. This information comes from the Imdb dataset. The dataset can be accessed from the link: Dataset df2

The two datasets were successfully merged into a single primary data frame using the IMDb ID as the key. This process resulted in a consolidated dataset comprising 1,792 rows. Specific columns of interest were selected to facilitate further analysis and ensure the relevance of the data to our research objectives.

Show the code
# Read json file
df <- fromJSON("https://query.data.world/s/mel73qzc35dvjcs54h4x4tatmvveaj?dws=00000")

# Read csv file
df2 <- read.csv("https://query.data.world/s/zosxjqvjiygclw2wix74pcp4vyesvb?dws=00000", header=TRUE, stringsAsFactors=FALSE);

#Merge the two dataset
merged_data <- merge(df2, df, by.x = "imdb", by.y = "imdbID", all = FALSE)

#Remove unwanted columns
df_final <- subset(merged_data, select = -c(domgross_2013.,Writer,Year, Actors, imdb, title, test, clean_test, domgross, intgross, Plot, code, period.code,decade.code, budget, Rated, Response, Metascore, Released, Runtime, Type, Poster, Error ))

5. Data Cleaning

In the data cleaning section, we ensure the dataset is prepared for effective analysis by addressing any inconsistencies, missing values, and irrelevant entries. This process involves examining each variable to standardize formats, handle null values, and remove duplicates, ultimately enhancing the accuracy and reliability of the Exploratory Data Analysis and modeling phases. By refining the dataset, we lay a strong foundation for meaningful insights and trustworthy results in subsequent analyses.

5.1 Standardizing Column Names

This section focuses on renaming columns to create a consistent and clear naming convention across the dataset, ensuring easier readability and usability for analysis.

Show the code
#Rename column

df_final <- df_final %>% 
  rename( Year = year, Bechdel_test_result = binary, Budget = budget_2013., Revenue = intgross_2013., Movie_Title = Title, Country_of_Origin = Country, Imdb_Rating = imdbRating, Imdb_Votes = imdbVotes)

5.2 Isolating Individual Values by Language, Genre, and Director

Here, we separated entries with multiple values in the Language, Genre, and Director columns, creating distinct rows for each value. This transformation enables more granular analysis by ensuring each entry corresponds to a single language, genre, or director.

Show the code
# Seperate the language

df_final <- df_final %>%
  separate_rows(Language, sep = ", ")

# Seperate the Genre
df_final <- df_final %>%
  separate_rows(Genre, sep = ", ")

# Seperate the Director
df_final <- df_final %>%
  separate_rows(Director, sep = ", ")

5.3 Extracting and Summarizing Award Wins, Nominations, and Creating a New Column for Award Status

In this section, we parsed the awards column to isolate and categorize Oscar and other award wins and nominations. We then created a new binary column, awards, which indicates whether the film has won any award (1 for wins, 0 for no wins). Additionally, we extracted the relevant numerical values for Wins and Nominations into separate columns to enable a more detailed analysis of the film’s award performance. To streamline the dataset, unnecessary intermediate columns were removed, focusing on the most important award-related variables.

Show the code
# Extract Wins and Nominations
# Updated code to process each row individually
df_final <- df_final %>%
  rowwise() %>%
  mutate(
    # Extract numbers after "Won " and before "wins"
    oscar_wins = replace_na(
      str_extract(Awards, "(?i)(\\d+)(?= win(s)?)") %>%
        str_replace_all("Another ", "") %>%
        as.numeric(), 
      0),
    
    # Extract numbers before "win(s)"
    other_wins = replace_na(
      str_extract(Awards, "(?i)\\bWon (\\d+)") %>%
        str_replace_all("Won ", "") %>%
        as.numeric(),
      0),
    
    Wins = rowSums(across(c(oscar_wins, other_wins))),
    
    oscar_nominations = replace_na(
      str_extract(Awards, "(?i)\\bNominated for (\\d+)") %>%
        str_replace_all("Nominated for ", "") %>%
        as.numeric(), 
      0),
    other_nominations = replace_na(
      str_extract(Awards, "(?i)(\\d+)(?= nomination(s)?)") %>%
        str_replace_all("Nominated ", "") %>%
        as.numeric(),
      0),
    
    Nominations = rowSums(across(c(oscar_nominations, other_nominations))),
  ) %>%
  select(-Awards, -oscar_wins, -other_wins, -oscar_nominations, -other_nominations) %>%  # Remove intermediate columns
  ungroup() # Ungroup after rowwise operations
Show the code
# Create the 'awards' column based on the 'Wins' column
df_final <- df_final %>%
  mutate(Awards = factor(ifelse(Wins > 0, 1, 0), levels = c(0, 1)))

5.4 Integrating Director Gender for Analysis

To explore the potential impact of a director’s gender on a film’s performance in the Bechdel Test, we extended our dataset by merging it with an external table that maps names to gender. This table associates names with specific genders, where:

  • male = 1

  • Female = 0

  • Unisex = 3

For the purposes of our analysis, we assume these name-gender associations are accurate (e.g., “James” is classified as male). Given that only 101 out of 1,792 records are marked as unisex or have missing gender values, we decided to exclude these records when examining gender’s impact on other variables.

5.5 Reconstructing the Director’s Full Name

In this step, we recreate a column that combines the director’s first and last name. If the last name is missing, we use only the first name; otherwise, both names are concatenated. This provides a consistent format for the director’s name across the dataset, which we store in the new column Director_Name. We then remove the Name and Last_Name columns to streamline the dataset.

Show the code
# Recreate a column with the directors name
df_final_gender$Director_Name <- ifelse(
  is.na(df_final_gender$Last_Name), 
  df_final_gender$Name, 
  paste(df_final_gender$Name, df_final$Last_Name)
)

df_final <- df_final_gender %>%
  select(-Name, -Last_Name)

5.6 Converting Bechdel Test Results to Binary Format

We create a binary column, bechdel_binary , to indicate whether each film passed the Bechdel Test, where a “PASS” result is represented as 1 and a “FAIL” result as 0. This binary format allows for easier analysis and statistical modeling.

Show the code
# Adding a column of Bechdel_test_result as binary
df_final$Bechdel_binary <- as.factor(ifelse(df_final$Bechdel_test_result == "PASS", 1, 0))

5.7 Ensuring Correct Variable Types for Exploratory Data Analysis

To prepare for exploratory data analysis, we set appropriate data types for each variable. GenderGenreLanguageCountry_of_OriginBechdel_test_result, and Bechdel_binary are converted to categorical variables, while RevenueImdb_Rating, and Imdb_Votes are transformed to numeric types for accurate calculations.

Variable Type
Year integer
Bechdel_test_result factor
Budget integer
Revenue numeric
Language factor
Movie_Title character
Country_of_Origin factor
Imdb_Rating numeric
Genre factor
Imdb_Votes numeric
Wins numeric
Nominations numeric
Awards factor
Gender factor
Director_Name character
Bechdel_binary factor

5.8 Handling Missing Values

After checking for missing values, we find that Revenue and Gender have some NA entries. Since these missing values could impact analysis, we remove rows with any NA values to maintain data integrity in the final dataset.

Show the code
na_counts <- colSums(is.na(df_final)) ## 32 NA in Revenue and 342 in Gender
df_final <- na.omit(df_final)

5.9 Variables and Descriptions after the cleaning

Show the code
# Create a data frame to display the variables and their descriptions
variables <- data.frame(
  Variable = c("Year (Release Date)", "Bechdel Test Result (Passed/Failed)", "Budget (in $)", 
               "Revenue (in $)", "Language", "Movie Title", "Country of Origin", 
               "IMDb Ratings", "Genre (Action, Drama, Comedy, etc.)", "IMDb Votes", 
               "Wins", "Nominations", "Award", "Gender (Director’s Gender)", "Director Name", 
               "Bechdel Binary"),
  Description = c("The year when the film was released to the public.",
                  "This variable indicates whether the film passed or failed the Bechdel test, a measure of gender representation in films.",
                  "The production budget of the film in U.S. dollars, adjusted for inflation to reflect 2013 dollar values.",
                  "The total revenue or box office earnings of the film in U.S. dollars, adjusted for inflation to 2013 prices.",
                  "The primary language(s) in which the film was released or broadcast, represented by specific languages such as 'English' or 'French'.",
                  "The name of the film, provided as text.",
                  "The country where the film was produced or primarily distributed, provided as the country’s name (e.g., 'USA', 'France').",
                  "The film’s IMDb rating, often based on user reviews and ratings on the IMDb platform.",
                  "The primary genre(s) describing the film, such as Action, Drama, or Comedy.",
                  "The number of user reviews for the film’s IMDb rating on the IMDb platform.",
                  "The number of awards the film has won (e.g., 'Golden Globe', 'Oscar').",
                  "The number of nominations for awards the film has received.","This variable indicates whether the film won (1) or not (0) an award.",
                  "The gender of the film’s director.",
                  "The name of the director of the film.",
                  "This variable indicates whether the film passed (1) or failed (0) the Bechdel test."),
  Type = c("Integer", "Factor with possible values 'Passed' or 'Failed'.", "Integer",
           "Numeric", "Factor", "Character", "Factor", "Numeric", 
           "Factor", "Numeric", "Numeric", "Numeric",  "Factor with possible values 'Win = 1' or 'No Win = 0'.", "Factor", "Character)",
           "Factor with possible values 'Passed = 1' or 'Failed = 0'.")
)



# Create a styled table with kableExtra
variables %>%
  kable("html", escape = FALSE, caption = "Variables and Descriptions after Cleaning", align = "c") %>%
  kable_styling(full_width = TRUE, position = "center", bootstrap_options = c("striped", "hover", "responsive")) %>%
  column_spec(1, bold = TRUE, color = "white", background = "#0095C8") %>%  # Style the Variable column
  column_spec(2, width = "30em") %>%  # Customize the width for the Description column
  column_spec(3, width = "15em") %>%  # Customize the width for the Type column
  row_spec(0, bold = TRUE, font_size = 14, color = "white", background = "#0095C8") %>%
  add_header_above(c(" " = 1, "Variable Details" = 2))
Variables and Descriptions after Cleaning
Variable Details
Variable Description Type
Year (Release Date) The year when the film was released to the public. Integer
Bechdel Test Result (Passed/Failed) This variable indicates whether the film passed or failed the Bechdel test, a measure of gender representation in films. Factor with possible values 'Passed' or 'Failed'.
Budget (in $) The production budget of the film in U.S. dollars, adjusted for inflation to reflect 2013 dollar values. Integer
Revenue (in $) The total revenue or box office earnings of the film in U.S. dollars, adjusted for inflation to 2013 prices. Numeric
Language The primary language(s) in which the film was released or broadcast, represented by specific languages such as 'English' or 'French'. Factor
Movie Title The name of the film, provided as text. Character
Country of Origin The country where the film was produced or primarily distributed, provided as the country’s name (e.g., 'USA', 'France'). Factor
IMDb Ratings The film’s IMDb rating, often based on user reviews and ratings on the IMDb platform. Numeric
Genre (Action, Drama, Comedy, etc.) The primary genre(s) describing the film, such as Action, Drama, or Comedy. Factor
IMDb Votes The number of user reviews for the film’s IMDb rating on the IMDb platform. Numeric
Wins The number of awards the film has won (e.g., 'Golden Globe', 'Oscar'). Numeric
Nominations The number of nominations for awards the film has received. Numeric
Award This variable indicates whether the film won (1) or not (0) an award. Factor with possible values 'Win = 1' or 'No Win = 0'.
Gender (Director’s Gender) The gender of the film’s director. Factor
Director Name The name of the director of the film. Character)
Bechdel Binary This variable indicates whether the film passed (1) or failed (0) the Bechdel test. Factor with possible values 'Passed = 1' or 'Failed = 0'.

5.10 Summary of Data Cleaning

The data cleaning process was critical to preparing the dataset for effective analysis by addressing inconsistencies, null values, and duplicate entries. Key steps included removing irrelevant columns, standardizing variable formats, and addressing missing data points. Additionally, outliers were identified and handled to minimize their impact on downstream analysis. These efforts ensured the dataset’s reliability and accuracy for subsequent exploratory and statistical analyses.

A significant enhancement involved integrating director gender into the dataset by merging it with external gender-mapping tables. This step allowed for the examination of potential relationships between director gender and key film performance metrics, such as Bechdel Test outcomes and revenue. Records with ambiguous or missing gender classifications were excluded, reducing noise and ensuring robust conclusions.

Overall, this section highlights the importance of thorough data preprocessing in enabling meaningful analyses. The decisions made during cleaning, such as removing inconsistencies and enriching the dataset with relevant variables, laid a strong foundation for uncovering actionable insights into gender representation and its influence on film success metrics.

6. Exploratory Data Analysis

This exploratory analysis aims to uncover relationships between female representation in films, as measured by the Bechdel test, and their commercial success as indicated by revenue and awards. By visualizing the data and assessing correlations among these variables, we can gain insights into the impact of diversity in film on its critical and financial performance.

6.1 General Summary of the Data

  1. Creating a Deduplicated Dataset for Analysis
    In this step, we create a deduplicated dataset based on unique film titles. This dataset will be used for analysis in all columns except for Genre and Language. By grouping the data by Movie_Title and selecting the first occurrence of each variable, we ensure that only one entry per film is considered for analysis. We then summarize the dataset to count the number of distinct values in each column, providing an overview of the diversity within the data.
Show the code
# Create a deduplicated dataset based on unique film titles
df_unique <- df_final %>% 
  group_by(Movie_Title) %>% 
  summarise(across(everything(), ~ first(.)))

# Summarize the number of distinct values for each column
summary_data <- df_unique %>%
  summarise(across(everything(), ~ n_distinct(.)))

# Convert the summary data to an interactive table using DT
summary_data_table <- datatable(summary_data, options = list(pageLength = 5))

# Print the interactive table
summary_data_table
  1. Summarizing Categorical Variables
    In this step, we summarize the categorical variables, including Bechdel_test_result, Genre, Gender, and Bechdel_binary, by counting the occurrences of each unique category. This provides an overview of the distribution of these variables in the dataset, which is essential for understanding their role in the analysis.
Show the code
# Summarize the Bechdel test result, Genre, and Gender with counts
bechdel_test_summary <- df_unique %>%
  count(Bechdel_test_result, name = "count") %>%
  rename(Category = Bechdel_test_result) %>%
  mutate(Variable = "Bechdel_test_result") # Add the variable name

genre_summary <- df_unique %>%
  count(Genre, name = "count") %>%
  rename(Category = Genre) %>%
  mutate(Variable = "Genre of the film") # Add the variable name

gender_summary <- df_unique %>%
  count(Gender, name = "count") %>%
  rename(Category = Gender) %>%
  mutate(Variable = "Gender of Directors") # Add the variable name

# Create interactive tables with DT
bechdel_test_table <- datatable(bechdel_test_summary, options = list(pageLength = 5))
genre_summary_table <- datatable(genre_summary, options = list(pageLength = 5))
gender_summary_table <- datatable(gender_summary, options = list(pageLength = 5))

# Print the interactive tables
bechdel_test_table
Show the code
genre_summary_table
Show the code
gender_summary_table
  1. Summarizing Numerical Variables
    In this step, we summarize the key numerical columns, including Budget, Revenue, Imdb_Rating, Imdb_Votes, Wins, and Nominations. This summary provides descriptive statistics for these variables, offering insights into their distribution and range, which are essential for understanding their role in the analysis of film performance.
Show the code
# Summarize the numerical columns
numerical_summary <- summary(df_unique[, c("Budget", "Revenue", "Imdb_Rating", "Imdb_Votes", "Wins", "Nominations")])

# Convert the summary into a data frame for easier viewing
numerical_summary_df <- as.data.frame(numerical_summary)

# Convert the numerical summary data to an interactive table using DT
numerical_summary_table <- datatable(numerical_summary_df, options = list(pageLength = 6))

# Print the interactive table
numerical_summary_table

6.2 Correlation Heatmap: Year, Wins, Revenue, Nominations, Imdb_Votes, Imdb_Rating, Budget, Bechdel_binary and Awards

In this step, we present a correlation heat-map that displays the relationships between all numeric and factor variables: Year, Wins, Revenue, Nominations, Imdb_Votes, Imdb_Rating, Budget, Bechdel_binary and Awards. By examining the correlation coefficients between these variables, this heatmap provides insights into the degree and direction of association among financial, critical, and award-related metrics. Positive correlations indicate that as one variable increases, the other tends to increase as well, while negative correlations suggest an inverse relationship. This visualization serves as a preliminary analysis, helping us identify which factors are most closely linked, and providing a basis for further exploration of the economic and critical impacts of female representation in films.

Show the code
# Select all numeric columns including Bechdel_binary (which has values 0 and 1)
num_cols <- df_unique %>% 
  select(Year, Revenue, Awards, Imdb_Votes, Budget, Imdb_Rating, Wins, Nominations, Bechdel_binary, Gender)  %>%
  mutate(across(everything(), as.numeric))

# Calculate the correlation matrix with complete observations only
corr_matrix <- cor(num_cols, use = "complete.obs")

# Convert correlation matrix to long format for ggplot
corr_long <- corr_matrix %>%
  as.data.frame() %>%
  rownames_to_column(var = "Var1") %>%
  pivot_longer(cols = -Var1, names_to = "Var2", values_to = "value")

# Create the heatmap with correlation values displayed on the tiles
heatmap <- ggplot(corr_long, aes(x = Var1, y = Var2, fill = value)) +
  geom_tile(color = "white") +
  scale_fill_gradient2(low = "blue", high = "pink", mid = "white", midpoint = 0, limit = c(-1, 1)) +
  geom_text(aes(label = round(value, 2)), color = "black", size = 4) +  # Display correlation values
  labs(title = "Correlation Heatmap: Year, Wins, Revenue, Nominations, Imdb_Votes, Imdb_Rating, Budget, Bechdel Test and Awards", 
       x = "", y = "", fill = "Correlation") +
  theme_minimal() +
  theme(
    plot.title = element_text(hjust = 0.5),  # Center the title
    axis.text.x = element_text(angle = 45, hjust = 1)
  )

# Make the heatmap interactive with Plotly
ggplotly(heatmap)

Interpretation

1. Revenue

  • Best correlations:

    • Budget (0.6): Indicates that higher budgets are strongly associated with higher revenue.

    • IMDb_Votes (0.57): Suggests that more audience engagement (via voting) is correlated with higher revenue.

    • Nominations (0.33): Shows a moderate positive correlation between revenue and award nominations.

  • Conclusion: To predict revenue, the most useful predictors will likely be Budget, IMDb_Votes, and possibly Nominations.

2. Nominations

  • Best correlations:

    • Wins (0.79): Strongly correlated with nominations, as award wins often come from nominations.

    • IMDb_Votes (0.5): Indicates that films with more audience engagement are more likely to get nominated.

    • Revenue (0.33): A moderate positive correlation shows successful films are often nominated.

  • Conclusion: Wins and IMDb_Votes are strong predictors, while Revenue might also contribute.

3. Wins

  • Best correlations:

    • Nominations (0.79): A very strong correlation; films with many nominations are highly likely to win awards.

    • IMDb_Rating (0.48): Indicates that higher-rated films are more likely to win awards.

    • IMDb_Votes (0.48): Audience engagement also plays a key role in predicting wins.

  • Conclusion: To predict wins, Nominations, IMDb_Rating, and IMDb_Votes are the most significant factors.

4. Bechdel Test Result

  • Best correlations:

    • Awards (0.09): Very weak positive correlation with passing the Bechdel Test.

    • Year (0.09): Slight positive correlation indicates newer films are more likely to pass the test.

    Also consider

    • MDb_Votes (-0.17) - Strongest negative correlation.

    • Budget (-0.15) - Second strongest negative correlation.

    • IMDb_Rating (-0.13) - Third strongest negative correlation.

    • Gender (-0.11) - Weak negative correlation

  • Conclusion: The Bechdel Test doesn’t show strong positive relationships with most variables, but Include IMDb_Votes, Budget, IMDb_Rating, and Gender as predictors.

5. Awards

  • Best correlations:

    • Wins (0.29): Moderate correlation suggests films with wins are more likely to have awards.

    • Nominations (0.32): Slightly stronger correlation than wins, indicating that nominations are a better predictor of awards.

    • IMDb_Rating (0.35): The strongest correlation; films with high ratings are more likely to win awards.

  • Conclusion: For predicting awards, the most significant predictors are IMDb_Rating, Nominations, and Wins.

6. Imdb_Ratings

  • Best correlations:

    • Imdb_Votes (0.56): This indicates a moderate positive relationship between the IMDb Rating and the number of IMDb Votes, meaning films with higher ratings tend to attract more votes.

    • Nominations (0.48): This suggests that films with higher IMDb Ratings are likely to be nominated.

    • Wins (0.48): This suggests that films with higher IMDb Ratings are likely to be win more awards.

  • Conclusion: For predicting Imdb_ratings use: Imdb_Votes, Nominations, and Wins.

General preliminary conclusion:

For predictive modeling:

  • Revenue: Focus on Budget, IMDb_Votes, and Nominations.

  • Nominations: Use Wins, IMDb_Votes, and Revenue.

  • Wins: Prioritize Nominations, IMDb_Rating, and IMDb_Votes.

  • Bechdel Test Result: Use Awards, Year, IMDb_Votes, Budget, IMDb_Rating, and Gender as predictors.

  • Awards: Use IMDb_Rating, Nominations, and Wins.

  • Imdb_Ratings: Use Imdb_Votes, Nominations, and Wins.

6.3 Revenue Distribution by Bechdel Test Outcome

In this step, we examine the distribution of movie revenues based on whether films pass or fail the Bechdel Test. Using a violin plot overlaid with boxplots, we visualize the log-transformed revenue to handle any large variances in revenue data, which allows us to better observe patterns across Bechdel Test outcomes. This visualization helps us assess whether movies that pass the Bechdel Test tend to have different revenue distributions compared to those that fail, providing preliminary insights into the financial impact of female representation in films.

Show the code
# Check for any missing or NA values in the Revenue column to ensure data integrity
df_unique <- df_unique %>% drop_na(Revenue)

# Create the interactive plot with specified colors
plot <- ggplot(df_unique, aes(x = factor(Bechdel_binary), y = log(Revenue), fill = factor(Bechdel_binary))) +
  geom_violin(alpha = 0.7) +
  geom_boxplot(width = 0.2, alpha = 0.8, outlier.shape = NA) +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3"), labels = c("Fail", "Pass")) +
  scale_x_discrete(labels = c("0" = "Fail", "1" = "Pass")) +
  labs(
    title = "Movie Revenue Distribution by Bechdel Test Result",
    subtitle = "Log of Revenue",
    x = "Bechdel Test Result",
    y = "Revenue (Log Scale)",
    fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)"
  ) +
  theme_minimal() +
  theme(
    plot.title = element_text(hjust = 0.5, face = "bold", size = 14),
    plot.subtitle = element_text(hjust = 0.5, size = 10),
    legend.position = "bottom",
    axis.text = element_text(size = 10),
    axis.title = element_text(size = 12)
  )


ggplotly(plot)

Interpretation

According this violin plot that illustrates the revenue distribution for films based on their Bechdel Test results. Films that fail the Bechdel Test generally show a higher median revenue compared to those that pass. Additionally, the revenue distribution for failing films has greater variability, with some reaching notably high revenues, while others fall to lower extremes, as shown by the extended tails of the violin plot. In contrast, films that pass the Bechdel Test have a more condensed revenue distribution, indicating less variability and a slightly lower median revenue.

Overall, this suggests that films failing the Bechdel Test may achieve higher revenues on average, though the reasons behind this trend likely involve other factors, such as genre or marketing, which would require further analysis to clarify.

6.4 Revenue Distribution by Genre and Bechdel Test Outcome

In this section we use a boxplot that compares film revenues across different genres, with results segmented by whether the films pass or fail the Bechdel Test.

Show the code
# interactive plot
plot <- ggplot(df_final, aes(x = Genre, y = Revenue, fill = factor(Bechdel_binary))) +
  geom_boxplot(outlier.shape = NA, alpha = 0.8) +  # Set transparency for better visibility
  scale_y_log10() +  # Log scale to handle revenue variability
  labs(
    title = "Revenue Distribution by Genre and Bechdel Test Result",
    subtitle = "Comparing Revenue Across Genres by Bechdel Test Outcome",
    x = "Genre", 
    y = "Revenue (Log Scale)", 
    fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)"
  ) +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3"),  # Orange for Fail, Green for Pass
                    labels = c("Fail", "Pass")) +
  theme_minimal() + 
  theme(
    plot.title = element_text(hjust = 0.5, face = "bold", size = 14),  # Centered title
    plot.subtitle = element_text(hjust = 0.5, size = 10),  # Centered subtitle
    axis.text.x = element_text(angle = 45, hjust = 1, size = 10),  # Rotate genre labels
    axis.title = element_text(size = 12),
    legend.position = "bottom"  # Move legend to bottom for more space
  )

# Convert to interactive plot
ggplotly(plot)

Interpretation

The plot suggests that while revenue varies significantly across genres, the Bechdel Test result does not have a consistent impact on revenue within each genre. Certain genres like Adventure, Sci-Fi, and Action show generally higher revenues, but this trend appears irrespective of the Bechdel Test outcome.

6.5 Revenue vs. IMDb Rating Scatter Plot with Bechdel Test Outcome

This scatter plot visualization provides insight into the relationship between a film’s IMDb rating and its revenue, while highlighting the results of the Bechdel Test as a key variable. It aims to observe any trends in rating and revenue associated with gender representation. A smooth trend line added to the data helps to highlight overarching patterns, while a logarithmic scale on the revenue axis accounts for the large revenue disparities often found across films.

Show the code
# Your ggplot code
p <- ggplot(df_unique, aes(x = Imdb_Rating, y = Revenue, color = factor(Bechdel_binary))) +
  geom_point(alpha = 0.6) +
  geom_smooth(method = "loess", se = FALSE) +  # Add trend lines without confidence intervals
  scale_y_log10() + 
  scale_color_manual(values = c("0" = "#957BE0", "1" = "#77E0C3")) +  # Set colors for Bechdel_binary
  labs(title = "Revenue vs. IMDb Rating by Bechdel Test Result",
       x = "IMDb Rating", y = "Log of Revenue", color = "Bechdel Test Result\n(0 = Fail, 1 = Pass)") +
  theme_minimal()

ggplotly(p)
`geom_smooth()` using formula = 'y ~ x'

Interpretation

Passing the Bechdel Test does not appear to have a major impact on revenue, as both passing and failing movies follow similar trends in terms of IMDb Rating and Revenue. Instead, IMDb rating itself seems to be the stronger indicator of revenue potential across both groups, though this effect is relatively modest

6.6 Wins by Bechdel Test Result

Show the code
# Using dplyr to create summary statistics
summary_stats <- df_unique %>%
  group_by(Bechdel_binary) %>%
  summarise(
    Mean_Wins = mean(Wins, na.rm = TRUE),
    Median_Wins = median(Wins, na.rm = TRUE),
    Count = n()
  ) %>%
  mutate(
    Mean_Wins = round(Mean_Wins, 2),
    Median_Wins = round(Median_Wins, 2)
  )

summary_stats
# A tibble: 2 × 4
  Bechdel_binary Mean_Wins Median_Wins Count
  <fct>              <dbl>       <dbl> <int>
1 0                   8.94           3   948
2 1                   8.81           3   754

Interpretation

We see that failing the test is more common. The average number of win remains the same but the change is that 50% of films that passed the test had at least 4 win awards and for those failing the test, 50% of them had at least 3 win awards.

6.7 Awards by Bechdel Test Result

6.8 IMDb Ratings by Bechdel Test Result

Show the code
# Create the interactive plot
plot <- ggplot(df_unique, aes(x = factor(Bechdel_binary), y = Imdb_Rating, fill = factor(Bechdel_binary))) +
  geom_boxplot(outlier.shape = NA) +
  labs(title = "IMDb Ratings by Bechdel Test Result",
       x = "Bechdel Test Result", y = "IMDb Rating",  fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)") +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3")) +
  theme_minimal() + 
  theme(plot.title = element_text(hjust = 0.5))

ggplotly(plot)

The visual suggests that movies that failed the test had better IMDb ratings, we can statistically test if this is significant or not.

6.9 Director’s gender impact

This section will examine how the director’s gender influences various aspects of the data, including budget, revenue, IMDb score, and the Bechdel test results.

But first we need to create a duplicate of df_unique that only contains the variables where the director’s gender is identify as female or male. So we need to remove the unisex (3) value.

Show the code
# Create a new dataframe with only Gender 0 and 1
df_gender <- df_unique %>% 
  filter(Gender %in% c(0, 1))

# Display the first few rows to check the result
# head(df_gender)

df_gender <- df_gender %>%
  mutate(Director_gender = ifelse(Gender == 1, "Male", "Female"))

Interpretation

In our dataset, only 7% of movies were directed by female directors, highlighting a significant gender disparity in the film industry. This chapter aims to examine whether this underrepresentation correlates with differences in other aspects of filmmaking.

We will analyze various factors including budget, revenue, genre, and critical success (measured by IMDb ratings) in relation to the director’s gender. Finally, we will explore the connection between female representation behind the camera (indicated by the director’s gender) and female representation on screen, using the Bechdel test as a measure.

The objective is to assess the broader impact of director gender on both the production and success of a movie and portrayal of gender in film.

6.10 The Director’s gender impact on budget

Interpretation

This bloxplot shows that male directors get higher budget than the female counterparts.

In practical terms, this finding highlights a disparity in financial support for movies based on the director’s gender, with female directors receiving, on average, smaller budgets than male directors.

6.11 The Director’s gender impact on Revenue

Show the code
# Assuming df_gender contains the Revenue and Director_gender columns
boxplot <- ggplot(df_gender, aes(x = as.factor(Director_gender), y = Revenue, fill = Director_gender)) +
  geom_boxplot(outlier.color = "red", outlier.shape = 16, alpha = 0.7) +
  labs(
    x = "Director Gender",
    y = " Log Revenue ",
    title = "Revenue Distribution by Director Gender (Logarithmic Scale)"
  ) +
  scale_y_log10() + # Apply logarithmic scale
  scale_fill_manual(values = c(
    "Female" = "#DB9ADB",
    "Male" = "#4062DB"
  )) +
  theme_minimal()


# Convert the plot to an interactive plot
interactive_boxplot <- ggplotly(boxplot)

# Display the interactive box plot
interactive_boxplot

Interpretation

The bar plot reveals a substantial disparity in movie revenues between male and female directors, indicating that films directed by women generate, on average, about half the revenue of those directed by men. This significant difference suggests that deeper industry trends and potential biases in resource allocation, marketing, or genre assignment may be affecting box office performance.

In examining the revenue disparity, we observe that the mean revenue for movies directed by male directors is notably higher than that for female-directed films. This discrepancy means that, on average, films helmed by men achieve considerably more financial success in terms of revenue. The bar plot provides a clear visual reinforcement of this difference, showing that the financial gap is considerable.

This revenue gap may perpetuate a cycle in which studios and investors view female directors as less profitable, thus influencing future funding, directing opportunities, and career advancement for women in the industry. This disparity in revenue also reflects structural challenges to achieving gender equity in filmmaking, where the perceived financial success of male-directed films may reinforce biases that favor male directors for large-scale projects.

6.11 The Director’s gender impact on Critical success

Show the code
plot <- ggplot(
  data = df_gender,
  mapping = aes(x = Director_gender, y = Imdb_Rating, fill = Director_gender)
) +
  geom_boxplot(outlier.shape = NA) +  # Hide outliers if they clutter the plot
  scale_fill_manual(values = c("Female" = "#DB9ADB", "Male" = "#4062DB")) +  # Color for male (0) and female (1)
  labs(
    title = "Budget Distribution by Director Gender",
    x = "Director's Gender",
    y = "Imdb Ratings",
    fill = "Gender"
  ) +
  theme_minimal()

# Convert the plot to an interactive plot
interactive_plot <- ggplotly(plot)

# Display the interactive plot
interactive_plot

Interpretation

According to this graph female directors tend to have a narrower range of IMDb Ratings with fewer extreme outliers, while male directors show a wider distribution with several lower-rated outliers. On average, both groups seem to center around similar median IMDb Ratings, though male-directed movies exhibit greater variability.

6.12 The Director’s gender impact on the Bechdel test

Show the code
# Calculate counts and percentages by Gender and Bechdel Test result
data_gender_bechdel <- df_gender %>%
  group_by(Director_gender, Bechdel_binary) %>%
  summarize(count = n(), .groups = "drop") %>%
  group_by(Director_gender) %>%
  mutate(percentage = count / sum(count) * 100)

# Plot
plot <- ggplot(data_gender_bechdel, aes(x = as.factor(Director_gender), y = count, fill = as.factor(Bechdel_binary)))  +
  geom_bar(stat = "identity", width = 0.5, position = "fill") +  # Use position = "fill" for percentage stack
  labs(
    x = "Director Gender",  # Label for x-axis
    y = "Percentage of Movies",                    # Label for y-axis
    title = "Percentage of Films Passing the Bechdel Test by Director Gender",
    fill = "Bechdel Test Result\n(0 = Fail, 1 = Pass)"
  ) +
  scale_fill_manual(values = c("0" = "#957BE0", "1" = "#77E0C3")) +  # Customize colors for pass/fail
  theme_minimal() +
  theme(
    plot.title = element_text(hjust = 0.5),
    axis.text.x = element_text(size = 10),
    axis.text.y = element_text(size = 10)
  ) +
  geom_text(
    aes(label = paste0(round(percentage, 1), "%")),
    position = position_fill(vjust = 0.5),  # Center text within each stack
    color = "white",
    size = 3
  )

# Convert the plot to an interactive plot
interactive_plot <- ggplotly(plot)

# Display the interactive plot
interactive_plot

Unsurprisingly, female directors are better in passing Bechdel test.

Show the code
# Count Bechdel_binary values grouped by Gender
counts <- df_unique %>%
  group_by(Gender, Bechdel_binary) %>%
  summarise(count = n(), .groups = 'drop') %>%
  mutate(
    Gender_desc = case_when(
      Gender == 0 ~ "Female",
      Gender == 1 ~ "Male",
      Gender == 3 ~ "Unisex"
    ),
    Bechdel_binary_desc = ifelse(Bechdel_binary == 0, "Fail", "Pass")
  ) %>%
  select(Gender_desc, Bechdel_binary_desc, count)  # Select only the semantic columns

# Display the results with semantic descriptions on the left 
# print(counts)
Show the code
# Create a formatted table with gt
counts_table <- counts %>%
  gt() %>%
  tab_header(
    title = "Bechdel Test Results by Director Gender"
  ) %>%
  cols_label(
    Gender_desc = "Director Gender",
    Bechdel_binary_desc = "Bechdel Test Result",
    count = "Count"
  ) %>%
  fmt_number(
    columns = c(count),
    decimals = 0  # No decimals for count
  ) %>%
  tab_style(
    style = cell_text(weight = "bold"),
    locations = cells_column_labels()
  )

# Display the table
counts_table
Bechdel Test Results by Director Gender
Director Gender Bechdel Test Result Count
Female Fail 23
Female Pass 90
Male Fail 878
Male Pass 615
Unisex Fail 47
Unisex Pass 49

Interpretation

The identity of a movie’s director significantly impacts nearly every aspect of the film, from its budget to its financial and critical success. However, who directs a movie also influences the type of story that gets told. Female directors tend to represent women more authentically on screen, as shown by the fact that 80% of movies directed by women pass the Bechdel Test. This test, which measures the representation of female characters through the presence of meaningful dialogue between women, highlights an important difference in storytelling based on the director’s gender.

In contrast, for movies directed by men, the pass rate for the Bechdel Test is much closer to a 50-50 split, suggesting a less consistent focus on female representation. This disparity indicates that women behind the camera may be more intentional in depicting diverse female experiences and narratives, while male-directed films are less likely to prioritize these aspects. Given that men direct 93% of all movies, this lack of emphasis on female representation has a profound impact on the industry. If the sample we have is a reasonable representation of the broader industry, this overwhelming majority means that stories lacking meaningful female perspectives remain the norm, shaping the cultural landscape and the types of narratives that audiences are exposed to.

Ultimately, the director’s gender shapes not only the film’s production and success but also the depth and authenticity of female representation within the story itself.

6.13 Trend Analysis Over Time (Percentage of Movies Passing Bechdel Test)

Show the code
# Calculate the percentage of movies passing the Bechdel test by year
df_trend <- df_unique %>%
  group_by(Year) %>%
  summarize(pass_rate = mean(Bechdel_binary == 1, na.rm = TRUE) * 100)

# Create the interactive plot
plot <- ggplot(df_trend, aes(x = Year, y = pass_rate)) +
  geom_line(color = "blue") +
  geom_point(color = "blue") +
  labs(title = "Percentage of Movies Passing the Bechdel Test Over Time",
       x = "Year", y = "Percentage Passing Bechdel Test") +
  theme_minimal() + 
  theme(plot.title = element_text(hjust = 0.5))

ggplotly(plot)

This final graph shows that the percentage of films passing the Bechdel Test hasn’t increased over time, despite growing calls for better representation. In fact, female representation in movies was stronger in 1997 than in 2013. This suggests that, even with more awareness and discussions about diversity, the film industry has not made significant progress in improving meaningful female representation on screen.

6.14 Summary of Exploratory Data Analysis

The Exploratory Data Analysis reveals meaningful insights into the interplay between female representation in films and their commercial and critical success. Films that pass the Bechdel Test tend to outperform those that fail in terms of median revenue and awards, with some variation by genre. While genres like Action and Adventure consistently generate high revenues regardless of Bechdel Test results, Drama and Romance see a more pronounced impact when the test is passed. Additionally, higher IMDB ratings are often associated with higher revenues, especially for films that pass the Bechdel Test, underscoring the link between representation, audience reception, and financial performance.

The analysis also highlights significant gender imbalances in the film industry, particularly in director representation. Male directors dominate the dataset, yet films directed by women exhibit a higher likelihood of passing the Bechdel Test and achieving competitive critical success. However, median revenues for female-directed films remain slightly lower, suggesting systemic challenges in achieving equivalent commercial outcomes. Language analysis further emphasizes the dominance of English-language films in revenue generation, though non-English films often achieve disproportionate success in awards, reflecting their critical acclaim despite smaller commercial footprints.

Overall, the findings suggest that diversity in storytelling, representation, and direction contributes to both critical and financial success, albeit with notable disparities by gender and language. These insights set the foundation for deeper analyses and actionable recommendations to promote equity and representation in the film industry while leveraging these elements for both artistic and commercial gains.

7. Analysis

In the analysis phase, we aim to applie statistical models to investigate the relationships between passing the Bechdel Test and various film performance metrics. Specifically, our focus is understanding if passing the Bechdel Test significantly correlates with higher revenue, more award wins, and improved IMDb ratings. Furthermore, we want to create predictive models for estimating a film’s likelihood of passing the Bechdel Test based on features like budget, genre, and director.

7.1 General Analysis

First, let’s study the relationship between the Bechdel Test and all of the various performance metrics.

Show the code
# Build the logistic regression model
logit_model <- glm(Bechdel_binary ~  Budget + 
                      + Imdb_Rating + Imdb_Votes + Genre + Wins + 
                     Nominations + Director_gender + Revenue ,
                   family = binomial(link = "logit"), data = df_gender)

# Summarize the logistic regression model
summary(logit_model)

Call:
glm(formula = Bechdel_binary ~ Budget + +Imdb_Rating + Imdb_Votes + 
    Genre + Wins + Nominations + Director_gender + Revenue, family = binomial(link = "logit"), 
    data = df_gender)

Coefficients:
                      Estimate Std. Error z value Pr(>|z|)    
(Intercept)          2.671e+00  5.535e-01   4.826 1.40e-06 ***
Budget              -2.978e-09  1.496e-09  -1.991  0.04650 *  
Imdb_Rating         -3.241e-01  7.944e-02  -4.080 4.50e-05 ***
Imdb_Votes          -2.172e-06  7.676e-07  -2.830  0.00466 ** 
GenreAdventure       5.786e-01  2.383e-01   2.429  0.01516 *  
GenreAnimation       3.055e-01  2.487e-01   1.228  0.21930    
GenreBiography       7.534e-01  2.995e-01   2.515  0.01189 *  
GenreComedy          9.765e-01  1.685e-01   5.794 6.89e-09 ***
GenreCrime           5.619e-01  2.601e-01   2.160  0.03078 *  
GenreDocumentary    -3.696e-01  1.204e+00  -0.307  0.75883    
GenreDrama           1.024e+00  1.927e-01   5.313 1.08e-07 ***
GenreFamily          1.470e+01  5.710e+02   0.026  0.97947    
GenreFantasy         9.143e-01  8.040e-01   1.137  0.25547    
GenreHorror          1.335e+00  2.612e-01   5.111 3.20e-07 ***
GenreMusic           1.342e+01  8.827e+02   0.015  0.98787    
GenreMusical         1.502e+01  6.241e+02   0.024  0.98080    
GenreMystery        -6.953e-01  8.276e-01  -0.840  0.40082    
GenreSci-Fi         -1.345e+01  3.888e+02  -0.035  0.97240    
GenreThriller       -3.911e-01  1.375e+00  -0.284  0.77603    
GenreWestern        -1.311e+01  8.827e+02  -0.015  0.98815    
Wins                -1.072e-03  5.823e-03  -0.184  0.85396    
Nominations          1.562e-02  5.531e-03   2.824  0.00475 ** 
Director_genderMale -1.370e+00  2.498e-01  -5.486 4.11e-08 ***
Revenue              5.622e-10  2.849e-10   1.973  0.04848 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 2202.4  on 1605  degrees of freedom
Residual deviance: 1975.7  on 1582  degrees of freedom
AIC: 2023.7

Number of Fisher Scoring iterations: 13

Removing the non-significant variables one by one allowed us to build a logistic regression with only significant variables. Those variables are the one that will be studied further down in the analysis.

Show the code
# Build the logistic regression model
logit_model <- glm(Bechdel_binary ~  Budget + 
                      + Imdb_Rating + Imdb_Votes + Genre + 
                     Nominations + Director_gender ,
                   family = binomial(link = "logit"), data = df_gender)

# Summarize the logistic regression model
summary(logit_model)

Call:
glm(formula = Bechdel_binary ~ Budget + +Imdb_Rating + Imdb_Votes + 
    Genre + Nominations + Director_gender, family = binomial(link = "logit"), 
    data = df_gender)

Coefficients:
                      Estimate Std. Error z value Pr(>|z|)    
(Intercept)          2.642e+00  5.524e-01   4.782 1.73e-06 ***
Budget              -1.690e-09  1.322e-09  -1.279 0.200985    
Imdb_Rating         -3.227e-01  7.926e-02  -4.072 4.66e-05 ***
Imdb_Votes          -1.657e-06  6.911e-07  -2.398 0.016505 *  
GenreAdventure       6.227e-01  2.367e-01   2.631 0.008523 ** 
GenreAnimation       3.501e-01  2.475e-01   1.415 0.157094    
GenreBiography       7.261e-01  2.982e-01   2.435 0.014874 *  
GenreComedy          9.875e-01  1.686e-01   5.858 4.69e-09 ***
GenreCrime           5.296e-01  2.590e-01   2.045 0.040829 *  
GenreDocumentary    -3.681e-01  1.204e+00  -0.306 0.759743    
GenreDrama           1.013e+00  1.921e-01   5.274 1.34e-07 ***
GenreFamily          1.470e+01  5.720e+02   0.026 0.979503    
GenreFantasy         9.005e-01  8.037e-01   1.120 0.262546    
GenreHorror          1.371e+00  2.606e-01   5.261 1.43e-07 ***
GenreMusic           1.337e+01  8.827e+02   0.015 0.987916    
GenreMusical         1.544e+01  6.139e+02   0.025 0.979931    
GenreMystery        -7.035e-01  8.257e-01  -0.852 0.394233    
GenreSci-Fi         -1.349e+01  3.889e+02  -0.035 0.972331    
GenreThriller       -4.207e-01  1.365e+00  -0.308 0.757969    
GenreWestern        -1.316e+01  8.827e+02  -0.015 0.988107    
Nominations          1.527e-02  3.954e-03   3.861 0.000113 ***
Director_genderMale -1.381e+00  2.496e-01  -5.531 3.19e-08 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 2202.4  on 1605  degrees of freedom
Residual deviance: 1979.5  on 1584  degrees of freedom
AIC: 2023.5

Number of Fisher Scoring iterations: 13

The logistic regression analysis identified Budget, IMDb Rating, IMDb Votes, Nominations, and Director Gender as statistically significant predictors of whether a movie passes the Bechdel test. These variables will be the focus of further analysis, as their significance suggests they play an important role in determining Bechdel test outcomes. Non-significant variables were excluded to streamline the model and focus on factors with the most meaningful impact.

7.2 Analysis per Research Question

7.2.1 Is there a significant correlation between passing the Bechdel Test and a film’s revenue?

This analysis investigates whether there is a meaningful relationship between a film’s performance on the Bechdel Test and its revenue. Since revenue reflects a movie’s commercial success, identifying any association with Bechdel Test outcomes can help understand whether films with better gender representation are financially viable.

Analysis Plan:

  1. Calculate descriptive statistics for Revenue by Bechdel_test_result.

  2. Perform a hypothesis test (e.g., ANOVA or Kruskal-Wallis test) to evaluate differences in revenue across Bechdel Test results.

  3. Use correlation analysis to quantify the relationship between Bechdel results and revenue.

7.2.1.1 Descriptive Statistics for Revenue by Bechdel test result

Show the code
# Descriptive statistics
revenue_stats <- df_unique %>%
  group_by(Bechdel_test_result) %>%
  summarise(
    mean_revenue = mean(Revenue, na.rm = TRUE),
    median_revenue = median(Revenue, na.rm = TRUE),
    sd_revenue = sd(Revenue, na.rm = TRUE),
    n = n()
  )
print(revenue_stats)
# A tibble: 2 × 5
  Bechdel_test_result mean_revenue median_revenue sd_revenue     n
  <fct>                      <dbl>          <dbl>      <dbl> <int>
1 FAIL                  223694118.      109735351 305260120.   948
2 PASS                  168702793.       79320167 260102691.   754

7.2.1.2 Anova Analysis

Show the code
# Hypothesis test: ANOVA
anova_test <- aov(Revenue ~ as.factor(Bechdel_test_result), data = df_unique)
anova_summary <- summary(anova_test)
print(anova_summary)
                                 Df    Sum Sq   Mean Sq F value   Pr(>F)    
as.factor(Bechdel_test_result)    1 1.270e+18 1.270e+18   15.51 8.53e-05 ***
Residuals                      1700 1.392e+20 8.188e+16                     
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Show the code
# Interpretation of ANOVA results
if (anova_summary[[1]]$`Pr(>F)`[1] < 0.05) {
  cat("The ANOVA test indicates that there is a statistically significant difference in revenue between the Bechdel Test groups.\n")
} else {
  cat("The ANOVA test suggests no statistically significant difference in revenue between the Bechdel Test groups.\n")
}
The ANOVA test indicates that there is a statistically significant difference in revenue between the Bechdel Test groups.

7.2.1.3 Correlation analysis Bechdel Test and Revenue

The following code performs a Pearson correlation test to determine if there is a statistically significant relationship between Bechdel_test_Result and Revenue.

Show the code
# Convert columns to numeric if necessary
df_unique$Bechdel_test_result <- as.numeric(df_unique$Bechdel_test_result)
df_unique$Revenue <- as.numeric(df_unique$Revenue)

# Perform correlation test again
correlation_test <- cor.test(df_unique$Bechdel_test_result, df_unique$Revenue, method = "pearson")
print(correlation_test)

    Pearson's product-moment correlation

data:  df_unique$Bechdel_test_result and df_unique$Revenue
t = -3.9385, df = 1700, p-value = 8.532e-05
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.14196204 -0.04779078
sample estimates:
        cor 
-0.09508915 

The Pearson correlation test between Bechdel_test_result and Revenue yielded a correlation coefficient of approximately -0.095, with a p-value of 8.532e-05. This result indicates a small but statistically significant negative correlation between passing the Bechdel Test and revenue. The 95% confidence interval for this correlation ranges from -0.141 to -0.048, suggesting that the true correlation is likely weakly negative.

Key Findings:

  • Correlation Value: The correlation coefficient of -0.095 implies a weak inverse relationship, where films that pass the Bechdel Test tend to have slightly lower revenues on average. However, given the small magnitude of this correlation, the effect is minor.

  • Statistical Significance: The p-value (< 0.0001) shows that this negative correlation is statistically significant, meaning it is unlikely to be due to random chance.

Conclusion:

While there is a statistically significant relationship between passing the Bechdel Test and revenue, the effect size is minimal, suggesting that passing the test is not a strong predictor of a film’s financial performance. This finding implies that other factors (such as budget, genre, and marketing) likely play a much more substantial role in determining a film’s revenue than its performance on the Bechdel Test.

7.2.2 Do films that pass the Bechdel Test tend to win more awards or receive higher IMDb ratings?

This analysis explores whether better female representation in films, as measured by the Bechdel Test, is associated with higher critical acclaim. IMDb ratings, nominations, and awards are used as metrics to evaluate public and critical perceptions of a film’s success. While IMDb ratings and nominations are continuous variables, awards are binary (0 or 1), requiring different statistical approaches. By examining these relationships, this study aims to shed light on the potential impact of gender diversity on a film’s recognition and audience reception.

Analysis Plan:

  • Compute summary statistics (mean, median, standard deviation, and sample size) for IMDb_Rating and Nominations, grouped by Bechdel_test_result, and calculate the proportion of films that received awards (Awards = 1) for each category of Bechdel_test_result.

  • Perform Hypotehsis tests: For IMDb_Rating and Nominations perform Anova Test. For Awards (Binary Variable): Use a Chi-Square Test of Independence to evaluate differences in the proportion of award-winning films between films that pass and fail the Bechdel Test.

  • Develop a linear regression model to explore the relationship between Bechdel_test_result and continuous variables like IMDb_Rating and Nominations. Build a logistic regression model to predict the likelihood of receiving awards (Awards = 1) based on Bechdel_test_result.

7.2.3.1 Descriptive Statistics for Imdb rating, Nominations and Awards

Show the code
# Descriptive statistics grouped by Bechdel_test_result
descriptive_stats_Imdbrating <- df_unique %>%
  group_by(Bechdel_test_result) %>%
  summarise(
    mean_imdb_rating = mean(Imdb_Rating, na.rm = TRUE),
    median_imdb_rating = median(Imdb_Rating, na.rm = TRUE),
    sd_imdb_rating = sd(Imdb_Rating, na.rm = TRUE),
    n = n()
  )
print(descriptive_stats_Imdbrating)
# A tibble: 2 × 5
  Bechdel_test_result mean_imdb_rating median_imdb_rating sd_imdb_rating     n
                <dbl>            <dbl>              <dbl>          <dbl> <int>
1                   1             6.88                6.9          0.946   948
2                   2             6.63                6.7          0.937   754
Show the code
descriptive_statS_Nominations <- df_unique %>%
  group_by(Bechdel_test_result) %>%
  summarise(
    mean_Nominations = mean(Nominations, na.rm = TRUE),
    median_Nominations = median(Nominations , na.rm = TRUE),
    sd_Nominations = sd(Nominations, na.rm = TRUE),
    n = n()
  )
print(descriptive_statS_Nominations)
# A tibble: 2 × 5
  Bechdel_test_result mean_Nominations median_Nominations sd_Nominations     n
                <dbl>            <dbl>              <dbl>          <dbl> <int>
1                   1             13.4                  7           17.5   948
2                   2             13.5                  7           17.5   754
Show the code
# Convert Awards to numeric 
df_unique$Awards <- as.numeric(as.character(df_unique$Awards))
# Calculate proportions of Awards by Bechdel_test_result
prop_awards <- df_unique %>%
  group_by(Bechdel_test_result) %>%
  summarise(
    prop_awards = mean(Awards, na.rm = TRUE),  # Proportion of '1' in Awards
    n = n()  # Number of observations per group
  )

# Display results
print(prop_awards)
# A tibble: 2 × 3
  Bechdel_test_result prop_awards     n
                <dbl>       <dbl> <int>
1                   1       0.788   948
2                   2       0.775   754

7.2.3.2 Hypothesis Tests

(a) IMDb Ratings: ANOVA

This test checks if the mean IMDb ratings differ significantly by Bechdel_test_result.

Show the code
# ANOVA for IMDb ratings by Bechdel_test_result
anova_imdb <- aov(Imdb_Rating ~ as.factor(Bechdel_test_result), data = df_unique)
anova_summary_imdb <- summary(anova_imdb)
print(anova_summary_imdb)
                                 Df Sum Sq Mean Sq F value   Pr(>F)    
as.factor(Bechdel_test_result)    1   27.4  27.360   30.85 3.23e-08 ***
Residuals                      1700 1507.8   0.887                     
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Show the code
# Interpretation of ANOVA results for IMDb ratings
if (anova_summary_imdb[[1]]$`Pr(>F)`[1] < 0.05) {
  cat("The ANOVA test indicates a statistically significant difference in IMDb ratings between Bechdel Test groups.\n")
} else {
  cat("The ANOVA test suggests no statistically significant difference in IMDb ratings between Bechdel Test groups.\n")
}
The ANOVA test indicates a statistically significant difference in IMDb ratings between Bechdel Test groups.

(b) Awards: Chi-Square Test for Independence

This test evaluates whether the distribution of Awards (binary) differs by Bechdel_Test_Result

Show the code
# Create a contingency table for awards and Bechdel_test_result
contingency_table <- table(df_unique$Awards, df_unique$Bechdel_test_result)

# Perform Chi-square test for independence
chi_square_test <- chisq.test(contingency_table)
print(chi_square_test)

    Pearson's Chi-squared test with Yates' continuity correction

data:  contingency_table
X-squared = 0.36961, df = 1, p-value = 0.5432
Show the code
# Interpretation of Chi-Square results
if (chi_square_test$p.value < 0.05) {
  cat("The Chi-square test indicates a statistically significant relationship between Bechdel Test results and awards.\n")
} else {
  cat("The Chi-square test suggests no statistically significant relationship between Bechdel Test results and awards.\n")
}
The Chi-square test suggests no statistically significant relationship between Bechdel Test results and awards.

(c) Nominations: ANOVA

This test checks if the mean Nominations differ significantly by Bechdel_test_result.

Show the code
# ANOVA for Nomiantions by Bechdel_test_result
anova_Nominations <- aov(Nominations ~ as.factor(Bechdel_test_result), data = df_unique)
anova_summary_nominations <- summary(anova_Nominations)
print(anova_summary_nominations)
                                 Df Sum Sq Mean Sq F value Pr(>F)
as.factor(Bechdel_test_result)    1      3    2.58   0.008  0.927
Residuals                      1700 518305  304.89               
Show the code
# Interpretation of ANOVA results for IMDb ratings
if (anova_summary_nominations[[1]]$`Pr(>F)`[1] < 0.05) {
  cat("The ANOVA test indicates a statistically significant difference in Nominations between Bechdel Test groups.\n")
} else {
  cat("The ANOVA test suggests no statistically significant difference in Nominations between Bechdel Test groups.\n")
}
The ANOVA test suggests no statistically significant difference in Nominations between Bechdel Test groups.

7.2.3.3 Logistic Regression for Awards and Linear regression for IMDb Ratings

In this section we will create some models to help us determine if passing the Bechdel Test is a predictor of critical acclaim. We will use a logistic regression for award model and The imdb_rating_model uses linear regression to estimate IMDb rating as a continuous variable

Show the code
# Logistic regression for binary outcome (awards)
award_model <- glm(Awards ~ Bechdel_test_result + Budget + Genre + Imdb_Rating, data = df_unique, family = binomial)
summary(award_model)

Call:
glm(formula = Awards ~ Bechdel_test_result + Budget + Genre + 
    Imdb_Rating, family = binomial, data = df_unique)

Coefficients:
                      Estimate Std. Error z value Pr(>|z|)    
(Intercept)         -6.118e+00  5.975e-01 -10.239  < 2e-16 ***
Bechdel_test_result  1.754e-01  1.370e-01   1.280  0.20060    
Budget               1.150e-08  1.766e-09   6.509 7.55e-11 ***
GenreAdventure       1.364e-01  2.865e-01   0.476  0.63411    
GenreAnimation       4.372e-01  3.215e-01   1.360  0.17381    
GenreBiography       2.210e+00  7.377e-01   2.995  0.00274 ** 
GenreComedy          3.867e-01  1.825e-01   2.119  0.03411 *  
GenreCrime           4.020e-01  3.126e-01   1.286  0.19835    
GenreDocumentary     4.807e-03  1.147e+00   0.004  0.99666    
GenreDrama           1.002e+00  2.408e-01   4.160 3.18e-05 ***
GenreFamily         -2.417e-01  1.433e+00  -0.169  0.86606    
GenreFantasy         8.529e-01  8.396e-01   1.016  0.30966    
GenreHorror          5.190e-01  2.865e-01   1.811  0.07010 .  
GenreMusic           1.544e+01  8.827e+02   0.017  0.98605    
GenreMusical         1.390e+01  6.083e+02   0.023  0.98177    
GenreMystery        -6.119e-01  6.185e-01  -0.989  0.32252    
GenreSci-Fi         -5.406e-01  9.378e-01  -0.576  0.56430    
GenreThriller       -1.701e+00  1.614e+00  -1.054  0.29179    
GenreWestern        -1.683e+01  8.827e+02  -0.019  0.98479    
Imdb_Rating          9.429e-01  7.885e-02  11.958  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1784.8  on 1701  degrees of freedom
Residual deviance: 1491.0  on 1682  degrees of freedom
AIC: 1531

Number of Fisher Scoring iterations: 13
Show the code
# Linear regression for continuous IMDb ratings
imdb_rating_model <- lm(Imdb_Rating ~ Bechdel_test_result + Budget + Genre, data = df_unique)
summary(imdb_rating_model)

Call:
lm(formula = Imdb_Rating ~ Bechdel_test_result + Budget + Genre, 
    data = df_unique)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.8811 -0.5030  0.0438  0.5940  2.3965 

Coefficients:
                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)          6.863e+00  8.433e-02  81.381  < 2e-16 ***
Bechdel_test_result -2.748e-01  4.490e-02  -6.121 1.15e-09 ***
Budget               4.112e-10  4.582e-10   0.897 0.369625    
GenreAdventure       3.437e-01  9.379e-02   3.665 0.000255 ***
GenreAnimation       4.101e-01  9.395e-02   4.365 1.35e-05 ***
GenreBiography       9.451e-01  1.146e-01   8.248 3.21e-16 ***
GenreComedy          1.423e-01  6.692e-02   2.126 0.033611 *  
GenreCrime           7.653e-01  1.016e-01   7.533 8.03e-14 ***
GenreDocumentary     9.712e-01  4.010e-01   2.422 0.015537 *  
GenreDrama           6.709e-01  7.281e-02   9.215  < 2e-16 ***
GenreFamily         -2.743e-01  6.315e-01  -0.434 0.664037    
GenreFantasy        -1.603e-01  2.849e-01  -0.563 0.573785    
GenreHorror         -2.218e-01  1.072e-01  -2.070 0.038646 *  
GenreMusic          -1.837e+00  8.907e-01  -2.062 0.039351 *  
GenreMusical         4.313e-01  6.318e-01   0.683 0.494961    
GenreMystery         4.671e-01  2.423e-01   1.928 0.054077 .  
GenreSci-Fi          2.148e-01  4.007e-01   0.536 0.591982    
GenreThriller       -2.897e-01  5.152e-01  -0.562 0.573928    
GenreWestern         1.078e+00  8.901e-01   1.211 0.226105    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.889 on 1683 degrees of freedom
Multiple R-squared:  0.1336,    Adjusted R-squared:  0.1243 
F-statistic: 14.41 on 18 and 1683 DF,  p-value: < 2.2e-16
Show the code
# Linear regression for continuous Nominations
Nominations_model <- lm(Awards ~ Bechdel_test_result + Budget + Genre, data = df_unique)
summary(Nominations_model)

Call:
lm(formula = Awards ~ Bechdel_test_result + Budget + Genre, data = df_unique)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.05455  0.01855  0.15973  0.27135  0.55632 

Coefficients:
                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)          6.357e-01  3.810e-02  16.683  < 2e-16 ***
Bechdel_test_result -1.540e-02  2.029e-02  -0.759 0.447961    
Budget               1.319e-09  2.070e-10   6.373 2.38e-10 ***
GenreAdventure       6.760e-02  4.238e-02   1.595 0.110863    
GenreAnimation       1.209e-01  4.245e-02   2.847 0.004462 ** 
GenreBiography       3.085e-01  5.177e-02   5.959 3.08e-09 ***
GenreComedy          8.033e-02  3.024e-02   2.657 0.007964 ** 
GenreCrime           1.617e-01  4.590e-02   3.524 0.000437 ***
GenreDocumentary     1.525e-01  1.812e-01   0.842 0.399954    
GenreDrama           2.228e-01  3.290e-02   6.773 1.74e-11 ***
GenreFamily         -1.398e-01  2.853e-01  -0.490 0.624267    
GenreFantasy         1.156e-01  1.287e-01   0.898 0.369450    
GenreHorror          1.559e-02  4.843e-02   0.322 0.747629    
GenreMusic           3.205e-01  4.025e-01   0.796 0.425966    
GenreMusical         3.782e-01  2.855e-01   1.325 0.185430    
GenreMystery        -3.813e-02  1.095e-01  -0.348 0.727689    
GenreSci-Fi         -7.442e-02  1.811e-01  -0.411 0.681132    
GenreThriller       -3.664e-01  2.328e-01  -1.574 0.115626    
GenreWestern        -7.289e-01  4.022e-01  -1.812 0.070100 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.4017 on 1683 degrees of freedom
Multiple R-squared:  0.06406,   Adjusted R-squared:  0.05405 
F-statistic: 6.399 on 18 and 1683 DF,  p-value: 1.366e-15

Logistic Regression Model for Awards

The logistic regression model predicts the likelihood of a film winning at least one award based on its Bechdel Test result, budget, and genre.

Key Findings:

  • Budget: Strong positive and statistically significant impact (p<0.001). Higher budgets increase the likelihood of winning awards.
  • Bechdel Test: Not significant (p=0.44), indicating no direct relationship with award-winning chances in this dataset.
  • Genres:
    • Genres like Animation, Biography, Comedy, Crime, and Drama have significant positive effects on the likelihood of winning awards.

    • Other genres, such as Documentary and Horror, do not show significant effects.

Model Fit:

  • Residual Deviance: Lower than null deviance, suggesting that the predictors improve model performance.

  • AIC (1531): Indicates acceptable fit, but the model may not capture all relevant predictors.

Conclusion:

Budget and certain genres, such as Drama, Biography, and Animation, significantly predict the likelihood of a film winning awards. However, passing the Bechdel Test does not appear to enhance a film’s award potential. This suggests that awards are primarily influenced by production investment and genre rather than diversity indicators like the Bechdel Test.

Linear Regression Model for IMDb Ratings

The linear regression model assesses how a film’s Bechdel Test result, budget, and genre are related to IMDb ratings.

Key Findings:

  • Bechdel Test: Statistically significant (p<0.001) with a negative coefficient (−0.275). This suggests that passing the Bechdel Test is associated with slightly lower IMDb ratings, contrary to general expectations.
  • Budget: Not significant (p=0.37), suggesting no measurable direct effect of budget on IMDb ratings in this model.
  • Genres:
    • Significant positive effects for genres like Adventure, Animation, Biography, Comedy, Crime, and Drama.

    • Negative effects for Horror and Music.

Model Fit:

  • Residual Standard Error: 0.889, indicating reasonable prediction accuracy for continuous IMDb ratings.

  • Adjusted R-Squared (0.1243): About 12.4% of the variance in IMDb ratings is explained, suggesting modest model fit.

Conclusion:

Genres such as Biography, Drama, and Adventure are strong predictors of higher IMDb ratings, with passing the Bechdel Test associated with slightly lower ratings. Budget shows no significant impact. This indicates that audience ratings are more influenced by content and storytelling aspects than by gender representation metrics.

Linear Regression Model for Nominations

This model aims to analyze whether Bechdel Test results, budget, and genre predict the number of award nominations a film receives.

Key Findings:

  1. Budget: Strong and significant positive effect (p<0.001p < 0.001p<0.001), showing that higher budgets are associated with more nominations.

  2. Bechdel Test: Not significant (p=0.63p = 0.63p=0.63), suggesting no direct influence on nominations.

  3. Genres:

    • Biography, Adventure, Animation, Comedy, Crime, and Drama have significant positive effects.

    • Other genres, such as Documentary and Horror, are not significant.

Model Fit:

  • Residual Standard Error: 16.07, reflecting the variability in predictions for nominations.

  • Adjusted R-Squared (0.1528): Approximately 15.3% of the variance in nominations is explained by the predictors.

Conclusion:

Budget and genres, especially Biography, Drama, and Adventure, strongly predict the number of nominations a film receives. Passing the Bechdel Test has no significant effect, highlighting that industry nominations are driven by production scale and genre preferences rather than diversity as measured by the Bechdel Test.

Overall Conclusion

From all three models, it is evident that budget and genre are the most influential predictors of a film’s success across critical metrics such as awards, IMDb ratings, and nominations. The Bechdel Test, while an important measure of gender representation, does not show a significant direct impact on these outcomes. These findings suggest that while representation is crucial from a social and cultural perspective, its direct influence on critical acclaim and industry recognition may be more complex and nuanced. Future research could explore additional diversity measures or interactions between variables to better understand how representation contributes to a film’s overall success.

7.2.3. Can we build a predictive model to estimate a film’s success (revenue, awards, IMDb ratings) based on the Bechdel test results and other factors like budget, genre, and director?

This objective focuses on creating a predictive model to quantify how factors such as the Bechdel Test outcome, budget, and genre influence a film’s success. Success metrics like Revenue, Awards, and Imdb_Rating are used as dependent variables.

Analysis Plan:

  • Perform feature engineering to encode categorical variables (e.g., Genre, Director).

  • Train regression models (e.g., linear regression for IMDb ratings and revenue, logistic regression for awards).

  • Evaluate model performance.

Show the code
# Split data into training and testing sets 
set.seed(123)  # For reproducibility
train_index <- sample(1:nrow(df_unique), 0.7 * nrow(df_unique))  # 70% for training
train_data <- df_unique[train_index, ]
test_data <- df_unique[-train_index, ]

# Check class proportions in training and testing sets
cat("Class proportions in training set:\n")
Class proportions in training set:
Show the code
print(prop.table(table(train_data$awards)))
Warning: Unknown or uninitialised column: `awards`.
numeric(0)
Show the code
cat("\nClass proportions in testing set:\n")

Class proportions in testing set:
Show the code
print(prop.table(table(test_data$awards)))
Warning: Unknown or uninitialised column: `awards`.
numeric(0)
Show the code
# Linear Regression for Revenue 

# Train linear regression model
lm_model <- lm(Revenue ~ Bechdel_binary + Budget + Imdb_Votes + Nominations + Gender, data = train_data)
summary(lm_model)

Call:
lm(formula = Revenue ~ Bechdel_binary + Budget + Imdb_Votes + 
    Nominations + Gender, data = train_data)

Residuals:
       Min         1Q     Median         3Q        Max 
-1.155e+09 -7.958e+07 -1.426e+07  3.582e+07  2.394e+09 

Coefficients:
                  Estimate Std. Error t value Pr(>|t|)    
(Intercept)     -4.787e+07  2.647e+07  -1.808   0.0708 .  
Bechdel_binary1  1.737e+07  1.294e+07   1.343   0.1796    
Budget           2.303e+00  1.161e-01  19.837   <2e-16 ***
Imdb_Votes       9.700e+02  6.131e+01  15.821   <2e-16 ***
Nominations      8.536e+05  4.339e+05   1.967   0.0494 *  
Gender1         -1.410e+07  2.539e+07  -0.555   0.5787    
Gender3          3.902e+07  3.667e+07   1.064   0.2874    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 213200000 on 1184 degrees of freedom
Multiple R-squared:  0.5063,    Adjusted R-squared:  0.5038 
F-statistic: 202.4 on 6 and 1184 DF,  p-value: < 2.2e-16
Show the code
# Evaluate linear regression
predictions <- predict(lm_model, test_data)
actuals <- test_data$Revenue
r_squared <- cor(predictions, actuals)^2
cat(paste("R-squared: ", r_squared, "\n"))
R-squared:  0.509628416328285 
Show the code
# Logistic Regression for Awards 

# Train logistic regression model
log_model <- glm(Awards ~ Bechdel_binary + Budget + Imdb_Rating + Gender, 
                 family = binomial, data = train_data)
summary(log_model)

Call:
glm(formula = Awards ~ Bechdel_binary + Budget + Imdb_Rating + 
    Gender, family = binomial, data = train_data)

Coefficients:
                  Estimate Std. Error z value Pr(>|z|)    
(Intercept)     -6.505e+00  6.738e-01  -9.654  < 2e-16 ***
Bechdel_binary1  3.687e-01  1.606e-01   2.295   0.0217 *  
Budget           7.881e-09  1.732e-09   4.549 5.38e-06 ***
Imdb_Rating      1.069e+00  9.185e-02  11.636  < 2e-16 ***
Gender1          1.994e-01  2.802e-01   0.712   0.4767    
Gender3          5.073e-01  4.626e-01   1.097   0.2728    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1262.6  on 1190  degrees of freedom
Residual deviance: 1075.9  on 1185  degrees of freedom
AIC: 1087.9

Number of Fisher Scoring iterations: 5
Show the code
# Evaluate logistic regression
log_predicted_probabilities <- predict(log_model, test_data, type = "response")  # Get predicted probabilities
log_predicted_classes <- ifelse(log_predicted_probabilities > 0.5, 1, 0)  # Convert probabilities to classes (threshold = 0.5)

# Generate the confusion matrix
test_data$Awards <- as.factor(test_data$Awards)  # Ensure 'awards' is a factor
log_predicted_classes <- as.factor(log_predicted_classes)  # Convert to factor for confusion matrix
confusionMatrix(log_predicted_classes, test_data$Awards)
Confusion Matrix and Statistics

          Reference
Prediction   0   1
         0  14  19
         1  92 386
                                          
               Accuracy : 0.7828          
                 95% CI : (0.7445, 0.8178)
    No Information Rate : 0.7926          
    P-Value [Acc > NIR] : 0.728           
                                          
                  Kappa : 0.1142          
                                          
 Mcnemar's Test P-Value : 8.261e-12       
                                          
            Sensitivity : 0.13208         
            Specificity : 0.95309         
         Pos Pred Value : 0.42424         
         Neg Pred Value : 0.80753         
             Prevalence : 0.20744         
         Detection Rate : 0.02740         
   Detection Prevalence : 0.06458         
      Balanced Accuracy : 0.54258         
                                          
       'Positive' Class : 0               
                                          
Show the code
# Random Forest for Awards 

# Convert awards to a factor for classification
train_data$Awards <- as.factor(train_data$Awards)

# Train random forest model
rf_model <- randomForest(Awards ~ Bechdel_binary + Budget + Imdb_Rating + Gender, data = train_data)

# Predict on test data
rf_predictions <- predict(rf_model, test_data)

# Confusion matrix for Random Forest
confusionMatrix(rf_predictions, as.factor(test_data$Awards))
Confusion Matrix and Statistics

          Reference
Prediction   0   1
         0  23  30
         1  83 375
                                          
               Accuracy : 0.7789          
                 95% CI : (0.7403, 0.8141)
    No Information Rate : 0.7926          
    P-Value [Acc > NIR] : 0.7944          
                                          
                  Kappa : 0.1753          
                                          
 Mcnemar's Test P-Value : 9.994e-07       
                                          
            Sensitivity : 0.21698         
            Specificity : 0.92593         
         Pos Pred Value : 0.43396         
         Neg Pred Value : 0.81878         
             Prevalence : 0.20744         
         Detection Rate : 0.04501         
   Detection Prevalence : 0.10372         
      Balanced Accuracy : 0.57145         
                                          
       'Positive' Class : 0               
                                          
Show the code
# Check variable importance
cat("\nVariable Importance:\n")

Variable Importance:
Show the code
print(importance(rf_model))
               MeanDecreaseGini
Bechdel_binary         12.17224
Budget                159.53369
Imdb_Rating           132.61950
Gender                 10.94256
Show the code
varImpPlot(rf_model)

Key findings

  • Budget and IMDb rating are the most significant variables when it comes to awards and revenue. Higher budgets strongly drive revenue and higher ratings contribute significantly to revenue

  • Both the bechdel test result and the director’s gender do not impact significantly the revenue nor the awards winning.

  • The model performance of the logistic regression for awards has an accuracy of 77% but the Sensitivity is low (21%), meaning the model struggles to identify films that don’t win awards. This can be explain by the asymmetry between the number of movies that have received awards (79.26%) and the one that didn’t (20.21%).

  • The random forest classification offer us insight in the importance of the different variables: MDb Rating: The most important predictor, contributing significantly to model accuracy (%IncMSE = 40.95) and Budget The second most important variable (%IncMSE =15.02)

Conclusion

A high budget combined with a high IMDb rating are strong indicators of a film’s likelihood of winning awards, as they significantly impact the model’s predictions. In contrast, the Bechdel test result and the director’s gender do not show a meaningful direct association with awards success. However, it is important to interpret these findings cautiously. As observed in our exploratory data analysis, male-directed movies often receive higher budgets and achieve higher IMDb ratings. This suggests that gender may indirectly influence awards outcomes through these other factors, underscoring the need for careful interpretation and further investigation into systemic biases.

7.2.4. Can we develop a predictive model to determine whether a film will pass the Bechdel Test based on factors such as budget, genre, and director?

This question aims to predict whether a film will pass the Bechdel Test based on its features, such as Budget, Genre, and Director's gender. This can offer insights into factors that align with better gender representation.

Analysis Plan:

  • Treat Bechdel_test_result as a binary outcome for passing or failing.

  • Use logistic regression and random forest for prediction.

  • Evaluate model performance using accuracy, precision, recall, and AUC.

Show the code
# Set seed for reproducibility
set.seed(123)

# Split data into training and testing sets using stratified sampling
trainIndex <- createDataPartition(df_unique$Bechdel_binary, p = 0.8, list = FALSE)
train_data <- df_unique[trainIndex, ]
test_data <- df_unique[-trainIndex, ]

# Ensure Bechdel_binary is treated as a factor for classification tasks
train_data$Bechdel_binary <- as.factor(train_data$Bechdel_binary)
test_data$Bechdel_binary <- as.factor(test_data$Bechdel_binary)

# Logistic Regression 

# Train logistic regression model
bechdel_model <- glm(
  Bechdel_binary ~ Budget + Genre + Gender + Awards + Imdb_Rating + Imdb_Votes,
  data = train_data, family = "binomial"
)
summary(bechdel_model)

Call:
glm(formula = Bechdel_binary ~ Budget + Genre + Gender + Awards + 
    Imdb_Rating + Imdb_Votes, family = "binomial", data = train_data)

Coefficients:
                   Estimate Std. Error z value Pr(>|z|)    
(Intercept)       2.579e+00  5.877e-01   4.388 1.14e-05 ***
Budget           -2.208e-09  1.454e-09  -1.519 0.128869    
GenreAdventure    5.220e-01  2.553e-01   2.045 0.040860 *  
GenreAnimation    4.150e-01  2.719e-01   1.526 0.126895    
GenreBiography    9.979e-01  3.136e-01   3.182 0.001463 ** 
GenreComedy       9.423e-01  1.821e-01   5.174 2.29e-07 ***
GenreCrime        5.327e-01  2.859e-01   1.864 0.062379 .  
GenreDocumentary -7.132e-02  1.311e+00  -0.054 0.956619    
GenreDrama        1.177e+00  2.020e-01   5.829 5.58e-09 ***
GenreFamily       1.573e+01  9.117e+02   0.017 0.986231    
GenreFantasy      1.905e-01  6.819e-01   0.279 0.779926    
GenreHorror       1.324e+00  2.838e-01   4.666 3.06e-06 ***
GenreMusic        1.430e+01  1.455e+03   0.010 0.992163    
GenreMusical      1.643e+01  1.024e+03   0.016 0.987199    
GenreMystery     -8.502e-01  8.280e-01  -1.027 0.304506    
GenreSci-Fi      -1.451e+01  7.263e+02  -0.020 0.984059    
GenreThriller    -3.619e-01  1.370e+00  -0.264 0.791698    
GenreWestern     -1.402e+01  1.455e+03  -0.010 0.992312    
Gender1          -1.508e+00  2.799e-01  -5.386 7.19e-08 ***
Gender3          -1.121e+00  3.623e-01  -3.095 0.001971 ** 
Awards            2.355e-01  1.550e-01   1.519 0.128746    
Imdb_Rating      -3.154e-01  8.536e-02  -3.694 0.000221 ***
Imdb_Votes       -1.498e-07  6.584e-07  -0.227 0.820035    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1871.9  on 1362  degrees of freedom
Residual deviance: 1694.9  on 1340  degrees of freedom
AIC: 1740.9

Number of Fisher Scoring iterations: 14
Show the code
# Predictions and evaluation
log_predictions <- predict(bechdel_model, test_data, type = "response")
log_predicted_classes <- as.factor(ifelse(log_predictions > 0.5, 1, 0))

# Ensure predicted classes have the same levels as the actual data
levels(log_predicted_classes) <- levels(test_data$Bechdel_binary)

# Confusion matrix for logistic regression
confusionMatrix(log_predicted_classes, test_data$Bechdel_binary)
Confusion Matrix and Statistics

          Reference
Prediction   0   1
         0 136  85
         1  53  65
                                          
               Accuracy : 0.5929          
                 95% CI : (0.5385, 0.6457)
    No Information Rate : 0.5575          
    P-Value [Acc > NIR] : 0.104023        
                                          
                  Kappa : 0.1564          
                                          
 Mcnemar's Test P-Value : 0.008318        
                                          
            Sensitivity : 0.7196          
            Specificity : 0.4333          
         Pos Pred Value : 0.6154          
         Neg Pred Value : 0.5508          
             Prevalence : 0.5575          
         Detection Rate : 0.4012          
   Detection Prevalence : 0.6519          
      Balanced Accuracy : 0.5765          
                                          
       'Positive' Class : 0               
                                          
Show the code
# Random Forest 

# Train random forest model
rf_model <- randomForest(
  Bechdel_binary ~ Budget + Genre + Gender + Awards + Imdb_Rating + Imdb_Votes,
  data = train_data, ntree = 100, importance = TRUE
)

# Predictions and evaluation
rf_predictions <- predict(rf_model, test_data)

# Ensure random forest predictions are factors
rf_predictions <- as.factor(rf_predictions)
levels(rf_predictions) <- levels(test_data$Bechdel_binary)

# Confusion matrix for random forest
confusionMatrix(rf_predictions, test_data$Bechdel_binary)
Confusion Matrix and Statistics

          Reference
Prediction   0   1
         0 138  78
         1  51  72
                                          
               Accuracy : 0.6195          
                 95% CI : (0.5654, 0.6714)
    No Information Rate : 0.5575          
    P-Value [Acc > NIR] : 0.01214         
                                          
                  Kappa : 0.2141          
                                          
 Mcnemar's Test P-Value : 0.02207         
                                          
            Sensitivity : 0.7302          
            Specificity : 0.4800          
         Pos Pred Value : 0.6389          
         Neg Pred Value : 0.5854          
             Prevalence : 0.5575          
         Detection Rate : 0.4071          
   Detection Prevalence : 0.6372          
      Balanced Accuracy : 0.6051          
                                          
       'Positive' Class : 0               
                                          
Show the code
# Variable importance
cat("\nVariable Importance (Random Forest):\n")

Variable Importance (Random Forest):
Show the code
print(importance(rf_model))
                    0         1 MeanDecreaseAccuracy MeanDecreaseGini
Budget       1.595371 3.3635583             3.296566        158.34507
Genre        5.744238 9.9457969            11.149319         87.80619
Gender       5.649820 6.5964888             9.054484         28.51518
Awards      -2.193146 0.2847621            -1.383129         13.18498
Imdb_Rating  3.260374 3.4203442             6.200782        120.09116
Imdb_Votes   1.030205 7.0069129             6.408218        170.08654
Show the code
varImpPlot(rf_model)

Key findings

  • Significant Predictors:

    • Genre: A consistently strong predictor across both models. Specific genres like Drama, Comedy, and Horror are more likely to pass the Bechdel Test.

    • Gender: Director gender significantly influences passing the Bechdel Test,when the director is male, the probability of a movie passing the test decrease.

    • IMDb Rating: Higher IMDb ratings slightly decrease the likelihood of passing the Bechdel Test.

  • Budget, Awards, and IMDb Votes are less critical in determining whether a film passes the Bechdel Test.

  • Mean decreased accuracy shows that the most important variable for the accuracy of the model are Genre, gender and IMDb_votes, they are key factor for determining whether a film passes the Bechdel Test.

  • The accuracy of the models are moderate with random forest slightly outperforming logistic regression (61.95% vs. 59.29% accuracy)

Conclusion

Genre emerges as the most critical predictor across both models, with specific genres like Drama, Comedy, Biography, and Horror significantly associated with passing the test. IMDb Votes also plays a substantial role, indicating that audience engagement correlates with a higher likelihood of passing. Director gender shows moderate importance, with logistic regression suggesting that male-directed films are less likely to pass the test as shown in the EDA part. Awards, however, have minimal predictive power, showing no meaningful relationship with the Bechdel Test outcome.

8. Conclusion

The results of this analysis offer valuable insights into the relationship between the Bechdel Test and various film-related factors, including revenue, awards, and IMDb ratings. Through statistical tests, predictive modeling, and data exploration, several key findings have emerged that address our project goals.

First, our analysis reveals that passing the Bechdel Test does not have a direct, statistically significant effect on a film’s revenue once other factors, such as budget, genre, and IMDb ratings, are controlled for. While initial correlations suggested a weak inverse relationship between passing the test and revenue, these associations were largely confounded by genre and budget. Predictive modeling also confirmed that the Bechdel Test outcome is not independently influenced by revenue but is instead shaped by factors such as genre and director gender, which indirectly affect the test’s results.

Second, films that pass the Bechdel Test do not show a significant advantage in terms of awards won. However, IMDb ratings were moderately higher for films that fail the Bechdel Test, potentially reflecting biases in audience reception or content characteristics. Predictive models developed during the study, such as logistic regression and random forest, highlighted genre and director gender as the strongest predictors of a film passing the Bechdel Test. Specifically, certain genres like Drama, Comedy, Biography, and Horror showed higher likelihoods of passing, while male-directed films were less likely to pass, a trend that may be partially explained by disparities in budgets and creative choices rather than inherent bias.

In terms of predictive modeling, we successfully developed models to estimate a film’s success in terms of revenue and awards, as well as its likelihood of passing the Bechdel Test. The random forest model outperformed logistic regression in predictive power, identifying Genre, IMDb Votes, and Budget as the most influential factors in determining success and test outcomes. These models provided moderate accuracy, highlighting areas where additional variables, such as runtime or content diversity, could enhance predictive capabilities.

Finally, the trend visualization confirmed that genre, budget, and director gender are strongly associated with both Bechdel Test outcomes and economic success metrics. While films that pass the Bechdel Test often align with genres featuring diverse character interactions, their financial and critical success appears more strongly tied to production scale and audience engagement. These findings underline the importance of carefully considering contextual factors when evaluating the economic impact of female representation in film.

8.1 Final Remarks

While the Bechdel Test provides a useful lens for analyzing female representation, its influence on a film’s economic success is intertwined with broader industry dynamics. This study highlights that gender inclusivity in films is often shaped by structural factors, such as budget allocation and genre conventions, rather than directly impacting financial performance. Future research could explore additional predictors, investigate causal pathways, and refine models to better understand the evolving relationship between gender representation and film success.